var gaode = new ol.layer.Tile({
  title: '高德地图',
  source: new ol.source.XYZ({
    url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}',
    wrapX: false,
    /* 2、设置跨域参数 */
    crossOrigin: 'Anonymous',
  }),
})
var tdKey = '4086e32774bba771f0c76308b759105f'
var TiandiMap_vec = new ol.layer.Tile({
  title: '天地图矢量图层',
  source: new ol.source.XYZ({
    url:
      'http://t0.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=' + tdKey, //parent.TiandituKey()为天地图密钥,
    wrapX: false,
    //解决导出图片
    crossOrigin: 'Anonymous',
  }),
})
var TiandiMap_cva = new ol.layer.Tile({
  title: '天地图矢量注记图层',
  source: new ol.source.XYZ({
    url:
      'http://t0.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=' + tdKey, //parent.TiandituKey()为天地图密钥
    wrapX: false,
    //解决导出图片
    crossOrigin: 'Anonymous',
  }),
})
// 天地图影像图层
var TiandiMap_img = new ol.layer.Tile({
  title: '天地图影像图层',
  source: new ol.source.XYZ({
    url:
      'http://t0.tianditu.com/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=' + tdKey,
    wrapX: false,
    crossOrigin: 'Anonymous',
  }),
})
// 天地图影像注记图层
var TiandiMap_cia = new ol.layer.Tile({
  title: '天地图影像注记图层',
  source: new ol.source.XYZ({
    url:
      'http://t0.tianditu.com/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=' + tdKey,
    wrapX: false,
    crossOrigin: 'Anonymous',
  }),
})
